package y_2025.m03.d01;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int[] counts = new int[10];
        countDigits(n, counts);
        for (int i = 0; i < 10; i++) {
            System.out.println(counts[i]);
        }
    }

    private static void countDigits(int n, int[] counts) {
        if (n == 0) return;
        String numStr = Integer.toString(n);
        int length = numStr.length();

        for (int i = 0; i < length; i++) {
            int divisor = (int) Math.pow(10, i);
            int high = n / (divisor * 10);
            int current = (n / divisor) % 10;
            int low = n % divisor;
            boolean isHighest = i == length - 1;

            for (int d = 0; d < 10; d++) {
                if (isHighest && d == 0) {
                    continue; // 最高位不能为0
                }
                if (d != 0) {
                    if (d < current) {
                        counts[d] += (high + 1) * divisor;
                    } else if (d == current) {
                        counts[d] += high * divisor + low + 1;
                    } else {
                        counts[d] += high * divisor;
                    }
                } else { // d == 0
                    if (isHighest) {
                        continue;
                    }
                    int highPart = high - 1;
                    if (highPart < 0) {
                        continue;
                    }
                    counts[0] += highPart * divisor;
                    if (current > d) {
                        counts[0] += divisor;
                    } else if (current == d) {
                        counts[0] += low + 1;
                    }
                }
            }
        }
    }
}